<?php

/**
 * 主动发送微信消息 
 */
include("Wechat.php");
include("snoopy.php");

$wechat = new weChatApi();
// 收到消息回复消息
if ($wechat->checkSignature()) {
    $return = $wechat->parseData();
    $reply = '回复内容';
    $wechat->sendText($return["fromUsername"], $return["toUsername"], "text", $reply);
}

// 主动发消息
$res = $wechat->send('5502235', time());
print_r( $res );
// 批量发送信息
//$wechat->batSend('1034585,1034586', time());
// 获取用户信息

//$data = $wechat->getInfo('1034585');
//var_dump($data);

//$friendInfo = $wechat->getAllFriendInfo(1);
//print_r( $friendInfo ); 
?>
